#ifndef DIMENSION_SELECT_H
#define DIMENSION_SELECT_H
#include "Mode.h"
#include "Function.h"
#include "Interpolation.h"

#define DEFAULT_F(dim) DIM_NAMESPACE(dim)::Default::f
#define DEFAULT_DF(dim) DIM_NAMESPACE(dim)::Default::df
#define DEFAULT_LAPLACE(dim) DIM_NAMESPACE(dim)::Default::laplace

#define GET_Restriction(dim) DIM_NAMESPACE(dim)::Restriction;
#define GET_Prolongate(dim) DIM_NAMESPACE(dim)::Prolongate;

#define GET_DEFAULT_FUN(type) get_##DEFAULT_##type

#define DECLARE_GET_DEFAULT_FUN(M_DEFAULT)        \
	inline funType get_##M_DEFAULT(Dimension dim) \
	{                                             \
		switch (dim)                              \
		{                                         \
		case One:                                 \
			return M_DEFAULT(One);                \
		case Two:                                 \
			return M_DEFAULT(Two);                \
		default:                                  \
			break;                                \
		}                                         \
		return M_DEFAULT(One);                    \
	}

DECLARE_GET_DEFAULT_FUN(DEFAULT_F)
DECLARE_GET_DEFAULT_FUN(DEFAULT_DF)
DECLARE_GET_DEFAULT_FUN(DEFAULT_LAPLACE)

#endif // !DIMENSION_SELECT_H
